-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ch/kltransform fsorder #102
base: master
Are you sure you want to change the base?
Conversation
(cherry picked from commit 3af5152218f19c271b0e26d7e1d8e6523f6f8772)
This pull request introduces 1 alert when merging de682ea into 94f0ece - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging b7733b1 into 94f0ece - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a few minor things to look at...
if self.diagonalisation_order == "sf": | ||
ind = np.where(evals > self.foreground_threshold) | ||
else: | ||
ind = np.where(evals < self.foreground_threshold) | ||
|
||
# Construct evextra dictionary (holding foreground ratio) | ||
evextra = {"ac": ac, "f_evals": evals.copy()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider using sf_evals
for S/F transform and fs_evals
for F/S transform, to make it more explicit which eigenvalues are being stored?
drift/core/doublekl.py
Outdated
if self.diagonalisation_order == "sf": | ||
f_evals = evextra["f_evals"] | ||
else: | ||
f_evals = evextra["f_evals"][::-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you reverse the order for F/S eigenvalues? To be consistent with the single-KL F/S case, shouldn't the order be left as it is?
Hey @sjforeman , I addressed your requests, the issue right now is that when simulating a pathfinder sized telescope the transform is not able to complete in the S/N step (matrix not positive definite). So this probably requires more research time before a final merge. |
drift/core/doublekl.py
Outdated
else: | ||
f_evals = evextra["f_evals"] | ||
|
||
f.create_dataset("f_evals", data=f_evals) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if-else doesn't do anything...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ja missed that one.. thanks.
Let's try it again after the new cedar CHIME environment is ready. I think pathfinder-sized telescopes were working fine for me, but I manually upgraded the version of scipy in my virtualenv. The new standard environment should have newer packages, so maybe that will solve your matrix issue. |
Alright sounds good! |
@cahofer I wrote down on Friday that you were going to run a quick test against the new CHIME env. Let us know when you get around to that one, but I don't think it's a rush. |
I'm going to convert this one to a draft until it's closer to be ready to merge. |
@cahofer Just wanted to follow up on this one. Did you manage to get any tests running through? |
uuuggh I am pushing through the very lasts bits of my thesis I will put this on hold until after the thesis is submitted! sorry! |
Allow F/S diagonalisation order in
kltransform.KLTransform
KLtransform
can be configured over the 'diagonalisation_order' config property. Accordingly, either high S/F and low F/S eigenvalues are selected.